package com.xframe.domain.e3sp.basedata;

import com.xframe.domain.BaseModel;
import com.xframe.xdal.core.annotation.*;
import com.xframe.xdal.core.constant.AutoFillType;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * @Description: 适用车型
 * @ClassName: com.xframe.domain.e3sp.basedata.SuitModel
 * @Author: xufeng
 * @CreateTime: 2024/1/1
 **/
@Data
@Accessors(chain=true)
@XTable(value = "p_t02_suit_model", label = "适用车型")
@XSelectItem(keyName = "suitModelId",codeName = "suitModelCode",textName = "suitModelCode")
@XBelongsTo(typeName = "com.xframe.domain.e3sp.basedata.Variety",foreignKey = "varietyId", targetKey = "varietyId",as = "refVariety")
public class SuitModel extends BaseModel {

    /**
     * 适用车型ID
     */
    @AutoFill(AutoFillType.Snowflake)
    @XColumn(name = "suit_model_id", primaryKeyFlag = true,desc = "适用车型ID")
    private Long suitModelId;
    /**
     * 品种ID
     */
    @XQueryCondition
    @XColumn(name = "variety_id",desc = "品种ID")
    private Long varietyId;


    /**
     * 适用车型编码
     */
    @XQueryCondition
    @XGridTableRef
    @XColumn(name = "suit_model_code", uniqueFlag = true,desc = "适用车型编码",length = 200)
    private String suitModelCode;


    /**
     * 启用时间
     */
    @XColumn(name = "start_time",desc = "启用时间",nullFlag = true)
    private Date startTime;

    /**
     * 停用时间
     */
    @XColumn(name = "stop_time",desc = "停用时间",nullFlag = true)
    private Date stopTime;

    /**
     * 说明
     */
    @XColumn(name = "description", nullFlag = true,desc = "说明",length = 500)
    private String description;

    /**
     * 中文名称
     */
    @XColumn(name = "name_cn", nullFlag = true,desc = "中文名称",length = 500)
    private String name;

    /**
     * 引用的品种
     */
    private Variety refVariety;
}
